//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    motto: 'Hello World',
    userInfo: {},
    hasUserInfo: false,
    canIUse: wx.canIUse('button.open-type.getUserInfo'),
    payment:'01',
    paymentText:'微信',
    maskShow:true
  },
  //事件处理函数
  bindViewTap: function() {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  paymentMethods:function(){
    this.setData({
      maskShow:false
    })
  },

  onReady:function(){
  },
  choosePay:function(e){
    this.setData({
      payment: e.target.dataset.pay
    })
    switch (e.target.dataset.pay) {
      case '03':
        this.setData({
          paymentText: "企业码"
        })
        break;
      case '02':
        this.setData({
          paymentText: "积分"
        })
        break;
      default:
        this.setData({
          paymentText: "微信"
        })
    }
    this.closeMask()
  },
  closeMask:function(){
    this.setData({
      maskShow: true
    })
  },
  onLoad: function () {
    
  },

})
